const eventObj = {
    evnetList: [],
    on(callbackFun, name) {
        this.evnetList.push({
            name,
            callbackFun
        })
    },
    emit(name, data) {
        this.evnetList.forEach(element => {
            if (name === element.name) {
                element.callbackFun(data)
            }
        });
    }
}
export default eventObj